<link href="../plugins/bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="../plugins/bootstrap-fontAwesome/css/font-awesome.css">
<style>
    .panel-body label{
        font-size: 12px;;
    }
    .btn:focus,
    .btn:active:focus,
    .btn.active:focus,
    .btn.focus,
    .btn:active.focus,
    .btn.active.focus {
        outline: none;
    }
</style>
<h4 align="center">备用金流水</h4>
<div ng-controller="depositRechargeCtrl">
    <div id="main" class="container">
        <div class="panel panel-default">
            <div class="panel-heading">
                <form class="form-inline">
                    <div class="form-group" style="margin-left: 10px;">
                        <label class="control-label">操作类型：</label>
                        <label>
                            <select class="form-control" ng-model="currentDepositType"
                                    ng-options="s.value for s in depositType"></select>
                        </label>
                    </div>
                    <div class="form-group" style="margin-left: 10px;">
                        <label class="control-label">操作时间：</label>
                        <label>
                            <input type="text" ng-model="startTime" class="form-control form_date"  style="width: 100px;">
                        </label>
                        <label class="glyphicon glyphicon-minus"></label>
                        <label>
                            <input type="text"  ng-model="endTime" class="form-control form_date"  style="width: 100px;">
                        </label>
                    </div>
                    <div class="form-group" style="margin-left: 10px;">
                        <label class="control-label">关键字：</label>
                        <label>
                            <input type="text" style="width: 300px;"  ng-model="searchKey" class="form-control" placeholder="请输入场馆ID/场馆Code/场馆名">
                        </label>
                        <button class="btn btn-default icon-search" title="点击查询" ng-click="searchRecharge(1)">&nbsp;确定</button>
                    </div>
                    <button class="btn btn-default icon-cloud-download pull-right" title="导出" ng-click="exportRecharge()">&nbsp;导出</button>
                </form>
            </div>
        </div>
        <div class="panel panel-default">
            <!-- Default panel contents -->
            <div class="panel-heading" style="padding: 5px 5px 0 10px;">
                <span class="pull-left h5">流水信息</span>
                <div class="clearfix"></div>
            </div>
            <!-- Table -->
            <table class="table table-hover .table-condensed ">
                <tr>
                    <th>场馆编号</th>
                    <th>场馆名称</th>
                    <th>原始金额</th>
                    <th>变动金额</th>
                    <th>操作后金额</th>
                    <th>操作方式</th>
                    <th>操作时间</th>
                    <th>备注</th>
                </tr>
                <tr ng-repeat="od in rechargeData.list">
                    <td>{{od.shopCode}}</td>
                    <td>{{od.shopName}}</td>
                    <td>{{od.oldSum}}</td>
                    <td>{{od.changeSum}}</td>
                    <td>{{od.newSum}}</td>
                    <td>{{od.otpType}}</td>
                    <td>{{od.optTime}}</td>
                    <td>{{od.remark}}</td>
                </tr>
            </table>
            <div class="panel-footer" style="padding: 5px 15px 2px;">
                <nav class="pull-right">
                    <ul class="pagination pagination-sm" style="margin: 0;">
                        <li ng-class="{'disabled':!rechargeData.hasPreviousPage}">
                            <a href="#" aria-label="Previous" ng-click="searchRecharge(rechargeData.pageNum-1)">
                                <span aria-hidden="true">上页</span>
                            </a>
                        </li>
                        <li ng-repeat="pageNum in rechargeData.navigatepageNums " ng-class="{'active':(pageNum==rechargeData.pageNum)}"><a href="#" ng-click="searchRecharge(pageNum)">{{pageNum}}</a></li>
                        <li ng-class="{'disabled':!rechargeData.hasNextPage}">
                            <a href="#" aria-label="Next" ng-click="searchRecharge(rechargeData.pageNum+1)">
                                <span aria-hidden="true">下页</span>
                            </a>
                        </li>
                    </ul>
                </nav>
                <div class="clearfix"></div>
            </div>

        </div>
    </div>
    <div>
        <form id="exportForm" action="export/excel/depositRechargeRecord" method="post">
            <input type="hidden" name="startTime" value="{{startTime}}">
            <input type="hidden" name="endTime" value="{{endTime}}">
            <input type="hidden" name="depositType" value="{{currentDepositType.key}}">
        </form>
    </div>
</div>

<script type="text/javascript">
    $('.form_date').datetimepicker({
        format: 'yyyy-mm-dd',
        language:  'zh-CN',
        weekStart: 1,
        todayBtn:  1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 2,
        minView: 2,
        forceParse: 0
    });
</script>